﻿class Program
{
    static void Main(string[] args)
    {
        // 创建一些示例待办事项
        var todos = new List<EleTodo>
        {
            new EleTodo { Id = Guid.NewGuid(), Name = "买牛奶", Remark = "超市", Status = TodoStatus.Pending },
            new EleTodo { Id = Guid.NewGuid(), Name = "买面包", Remark = "便利店", Status = TodoStatus.Completed },
            new EleTodo { Id = Guid.NewGuid(), Name = "买鸡蛋", Remark = "超市", Status = TodoStatus.Pending },
            new EleTodo { Id = Guid.NewGuid(), Name = "买面包", Remark = "超市", Status = TodoStatus.Pending }
        };

        // 创建 TodoAppService 实例
        var todoAppService = new TodoAppService(todos.AsEnumerable());

        // 使用规约来过滤待办事项
        var filteredTodos = todoAppService.FilterTodos("买面包");

        // 输出过滤后的待办事项
        foreach (var todo in filteredTodos)
        {
            Console.WriteLine($"ID: {todo.Id}, Name: {todo.Name}, Remark: {todo.Remark}, Status: {todo.Status}");
        }
    }
}




